#-------------------------------------------------
#
# Project created by QtCreator 2022-05-21T22:36:09
# Jet
#-------------------------------------------------

QT       += core gui concurrent network

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = zimingxiayi
TEMPLATE = app

BUILD_DIR = $$PWD/../../../bin/build
BIN_DIR = $$PWD/../../../bin
TOOLKIT_DIR = $$PWD/../../../Toolkits
MAGIC_LIB_DIR = ../libs
#TR_EXCLUDE  += $$TOOLKIT_DIR/boost_1_56_0/* \
#               $$TOOLKIT_DIR/opencv_3_4_1/include/* \


# Compiler and linker option for minidump.
win32:CONFIG(release, debug|release) {
   QMAKE_CXXFLAGS += /Ox /Zi /Fd"$$BIN_DIR/release/zimingxiayi.pdb"
   QMAKE_LFLAGS += /LARGEADDRESSAWARE /DEBUG /OPT:REF /OPT:ICF
   #QMAKE_LFLAGS += /MANIFESTUAC:"level='requireAdministrator'uiAccess='false'"
}


# Configurate compilation output.
CONFIG(debug, debug|release) {
    OBJECTS_DIR = "$$BUILD_DIR/debug/$$TARGET"
    RCC_DIR = "$$BUILD_DIR/debug/$$TARGET"
    MOC_DIR = "$$BUILD_DIR/debug/$$TARGET"
    UI_DIR = "$$BUILD_DIR/debug/$$TARGET"
    DESTDIR = "$$BIN_DIR/debug"
}
CONFIG(release, debug|release) {
    OBJECTS_DIR = "$$BUILD_DIR/release/$$TARGET"
    RCC_DIR = "$$BUILD_DIR/release/$$TARGET"
    MOC_DIR = "$$BUILD_DIR/release/$$TARGET"
    UI_DIR = "$$BUILD_DIR/release/$$TARGET"
    DESTDIR = "$$BIN_DIR/release"
}

INCLUDEPATH += $$TOOLKIT_DIR/opencv_3_4_1/include \
               $$TOOLKIT_DIR/boost_1_77_0/ \
               $$PWD/../../

# Link Magic libraries.
win32:CONFIG(release, debug|release): LIBS += -L$$BIN_DIR/release/ -lCore
else:win32:CONFIG(debug, debug|release): LIBS += -L$$BIN_DIR/debug/ -lCore

SOURCES += main.cpp\
    ui/SetupFrame.cpp \
    ui/HmiFrame.cpp \
    ui/MainWindowFrame.cpp \
    ViewModels/MainContentViewModel.cpp \
    Flow/WorkflowManager.cpp \
    ui/MainFrame.cpp \
    ViewModels/ViewModelBase.cpp \
    ui/CameraVideoSource.cpp \
    Remote.cpp \
    ZimingxiayiContext.cpp

HEADERS  += \
    ui/SetupFrame.h \
    ui/HmiFrame.h \
    ui/MainWindowFrame.h \
    ViewModels/MainContentViewModel.h \
    Flow/WorkflowManager.h \
    ui/MainFrame.h \
    ViewModels/ViewModelBase.h \
    ui/CameraVideoSource.h \
    Remote.h \
    ZimingxiayiContext.h

FORMS    += \
    ui/SetupFrame.ui \
    ui/MainWindowFrame.ui \
    ui/MainFrame.ui \
    ui/CameraVideoSource.ui

# Link OpenCV libraries.
win32:CONFIG(release, debug|release): LIBS += -L$$TOOLKIT_DIR/opencv_3_4_1/x86/vc12/lib -lopencv_core341 -lopencv_highgui341 -lopencv_imgproc341 -lopencv_imgcodecs341 -lopencv_videoio341
else:win32:CONFIG(debug, debug|release): LIBS += -L$$TOOLKIT_DIR/opencv_3_4_1/x86/vc12/lib -lopencv_core341d -lopencv_highgui341d -lopencv_imgproc341d -lopencv_imgcodecs341d -lopencv_videoio341d

# Link boost libraries.
win32:CONFIG(release, debug|release): LIBS += -L$$TOOLKIT_DIR/boost_1_77_0/stage/lib/ -llibboost_serialization-vc141-mt-x32-1_77 -llibboost_log-vc141-mt-x32-1_77
else:win32:CONFIG(debug, debug|release): LIBS += -L$$TOOLKIT_DIR/boost_1_77_0/stage/lib/ -llibboost_serialization-vc141-mt-gd-x32-1_77 -llibboost_log-vc141-mt-gd-x32-1_77

#win32 {
#    CONFIG(debug, debug|release) {
#        # DEFINES += _DEBUG
#        VLD_PATH = $$TOOLKIT_DIR/vld/src #C:/Program Files (x86)/Visual Leak Detector
#        INCLUDEPATH += $$VLD_PATH
#        LIBS += -L$$TOOLKIT_DIR/vld/src/bin/Win32/Debug-v142 -lvld
#    }
#}

RESOURCES += \
    ui/zimingxiayi.qrc \
